package com.icangya.domain;


import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "advert_record")
public class AdvertRecord {//广告记录表
        private long id;
        private String openId;//用户
        private double advertMoney;//广告点击费
        private double advertTopMoney;//广告上限费用

        private double giftAdvertMoney;//赠送的广告金

        private String advertContent;//广告文本内容
        /**
         * 创建广告时间
         */
         private Timestamp createTime;
        /**
         * 修改广告时间
         */
         private Timestamp modifiedTime;

        private long status;//广告信息状态  0正常   1广告费不足，下架
        private long realPageView;
        private long shamPageView;

    @Basic
    @Column(name = "real_pageview")
    public long getRealPageView() {
        return realPageView;
    }

    public void setRealPageView(long realPageView) {
        this.realPageView = realPageView;
    }

    @Basic
    @Column(name = "sham_pageview")
    public long getShamPageView() {
        return shamPageView;
    }

    public void setShamPageView(long shamPageView) {
        this.shamPageView = shamPageView;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "openid")
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "gift_advert_money")
    public double getGiftAdvertMoney() {
        return giftAdvertMoney;
    }

    public void setGiftAdvertMoney(double giftAdvertMoney) {
        this.giftAdvertMoney = giftAdvertMoney;
    }

    @Basic
    @Column(name = "advert_money")
    public double getAdvertMoney() {
        return advertMoney;
    }

    public void setAdvertMoney(double advertMoney) {
        this.advertMoney = advertMoney;
    }

    @Basic
    @Column(name = "advert_topmoney")
    public double getAdvertTopMoney() {
        return advertTopMoney;
    }

    public void setAdvertTopMoney(double advertTopMoney) {
        this.advertTopMoney = advertTopMoney;
    }

    @Basic
    @Column(name = "advert_content",length = 1000)
    public String getAdvertContent() {
        return advertContent;
    }

    public void setAdvertContent(String advertContent) {
        this.advertContent = advertContent;
    }

    @Basic
    @Column(name = "create_time")
    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "modified_time")
    public Timestamp getModifiedTime() {
        return modifiedTime;
    }


    public void setModifiedTime(Timestamp modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    @Basic
    @Column(name = "status")
    public long getStatus() {
        return status;
    }

    public void setStatus(long status) {
        this.status = status;
    }


    public AdvertRecord() {
    }

    public AdvertRecord(String openId, double advertMoney, double advertTopMoney, double giftAdvertMoney, String advertContent,
                       Timestamp createTime, Timestamp modifiedTime, long status) {
        this.openId = openId;
        this.advertMoney = advertMoney;
        this.advertTopMoney = advertTopMoney;
        this.giftAdvertMoney = giftAdvertMoney;
        this.advertContent = advertContent;
        this.createTime = createTime;
        this.modifiedTime = modifiedTime;
        this.status = status;
    }

    public AdvertRecord(String openId, double advertMoney, double advertTopMoney, Timestamp createTime, Timestamp modifiedTime,
                        String advertContent, long status) {
        this.openId = openId;
        this.advertMoney = advertMoney;
        this.advertTopMoney = advertTopMoney;
        this.createTime = createTime;
        this.modifiedTime = modifiedTime;
        this.advertContent=advertContent;
        this.status = status;
    }
}
